#include "Image.h"
#include <assert.h>

Image::Image()
{
	m_Image = 0;
}

bool Image::LoadImage(std::string ImageName)
{
	m_Image = IMG_Load(ImageName.c_str()); // 'ImageName.c_str()' converts the String of ImageName into a char*, C standard array!
	assert(m_Image);
	return (m_Image != 0);
}

void Image::DrawImage(int x, int y)
{
	SDL_Rect dest = { x, y, 0, 0 };
	SDL_BlitSurface(m_Image, 0, Screen::Instance()->GetSurface(), &dest);
}